# from random import sample
# n = 10
# a = sample(range(100), n)

a = [0, 1, 2, 3, 4, 5, 6, 7, 8]
L1 = a[1::2]
L2 = a[::2]
L1.extend(L2)
print(a)
print(L1)

# for i in range(len(a)):
#     if i % 2 != 0:
#         L1.append(a[i])
#
# for i in range(len(a)):
#     if i % 2 == 0:
#         L2.append(a[i])
